export const byteToSize = (bytes: number) => {
    const sizes = ['B', 'KiB', 'MiB', 'GiB', 'TiB', 'PiB', 'EiB', 'ZiB', 'YiB']
    if (bytes === 0) return '0B';
    const i = Math.floor(Math.log(bytes) / Math.log(1024));
    return (bytes / Math.pow(1024, i)).toFixed(2) + ' '+sizes[i]; // 保留两位小数
}
export const mbToByte = (mib: number) => {
    return mib * (1024 * 1024)
}